import PassportLayout from '@/view/passport/index'

import PassportLoginLayout from '@/view/passport/login'

export default [{
  name: 'passport',
  path: '/passport',
  component: PassportLayout,
  redirect: {
    name: 'passport/login'
  },
  children: [
    // 登录
    {
      name: 'passport/login',
      path: 'login', // 如果这里不使用 "/rhome" 则表示是归属于上级路由（上级luyou/子path），如果使用 "/rhome" 则表示根路径下访问
      component: PassportLoginLayout,
      redirect: {
        // 默认方式登录
        name: 'passport/login/default'
      },
      children: [
        // 默认方式登录
        {
          name: 'passport/login/default',
          path: 'default',
          component: () => import('@/view/passport/login/mode'),
          meta: {
            title: '帐号密码登录'
          }
        },
        // 短信方式登录
        {
          name: 'passport/login/sms',
          path: 'sms',
          component: () => import('@/view/passport/login/mode/sms'),
          meta: {
            title: '手机短信快捷登录'
          }
        }
      ]
    },
    // 注册
    {
      name: 'passport/register',
      path: 'register',
      component: () => import('@/view/passport/register'),
      meta: {
        title: '帐号注册'
      }
    },
    // 完善资料
    {
      name: 'passport/perfect',
      path: 'perfect',
      component: () => import('@/view/passport/perfect'),
      meta: {
        title: '完善资料'
      }
    },
    // 重置密码
    {
      name: 'passport/reset',
      path: 'reset',
      component: () => import('@/view/passport/reset'),
      meta: {
        title: '重置密码'
      }
    },
    // 找回帐号
    {
      name: 'passport/forget',
      path: 'forget',
      component: () => import('@/view/passport/forget'),
      meta: {
        title: '找回帐号'
      }
    }
  ]
}]
